/**
 * <p>功能:用户中心 <p>
 * @extends Wys.basic.BaseView
 * @author wys
 */
Ext.define('Jason.view.protal.authentication.UserCenter', {
    extend: 'Ext.container.Container',
    xtype: 'usercenter',
    requires: [
        'Jason.view.protal.authentication.AuthenticationController',
        'Jason.view.protal.authentication.AuthenticationModel'
    ],
    controller: 'authentication',
    viewModel: { type: 'authentication' },
    requires: [
        'Ext.panel.Panel',
        'Ext.plugin.Responsive',
        'Ext.button.Button',
        'Ext.layout.container.Accordion'
    ],

    layout: {
        type: 'hbox',
        align: 'stretch'
    },

    items: [
        {
            xtype: 'panel',
            title: '账户信息',
            flex: 1,
            ui: 'light',
            cls: 'shadow-panel pages-faq-container',
            bodyPadding: 15,
            defaults: {
                width: '100%',
                labelAlign: 'right',
                labelWidth: 60
            },
            items: [{
                xtype: 'wys-displayfield',
                fieldLabel: '帐号名称',
                fieldPrefix: '',
                bind: '{userInfo.realname}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '登录账号',
                bind: '{userInfo.loginname}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '职务',
                bind: '{userInfo.postText}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '工作状态',
                bind: '{userInfo.jobstateText}'
            }, {
                xtype: 'button',
                iconCls: 'fa fa-edit',
                listeners: {
                    click: 'onChenagePasscode'
                },
                text: '修改密码'
            }, {
                xtype: 'button',
                margin: '8 0',
                iconCls: 'fa fa-sign-out',
                ui: 'soft-danger',
                listeners: {
                    click: 'onSignOut'
                },
                text: '退出当前登录'
            }]
        },
        {
            xtype: 'panel',
            ui: 'light',
            margin: '0 0 0 0',
            flex: 1,
            cls: 'pages-faq-container shadow-panel',
            title: '其他信息',
            defaults: {
                width: '100%',
                labelAlign: 'right',
                labelWidth: 70
            },
            bodyPadding: 15,
            items: [{
                xtype: 'wys-displayfield',
                fieldLabel: '所属机构',
                fieldPrefix: '',
                bind: '{userInfo.deptname}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '姓名/昵称',
                fieldPrefix: '',
                bind: '{userInfo.realname}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '性别',
                bind: '{userInfo.sexText}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '身份证号',
                bind: '{userInfo.idcard}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '联系电话',
                bind: '{userInfo.mobphone}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '邮箱',
                bind: '{userInfo.email}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: 'QQ',
                bind: '{userInfo.qq}'
            }, {
                xtype: 'wys-displayfield',
                fieldLabel: '联系地址',
                bind: '{userInfo.address}'
            }]
        }
    ]
});